package com.briup.corejava.day09.test;

import com.briup.corejava.day09.pojo.Circle;
import com.briup.corejava.day09.pojo.Shape;

public class ShapeTest_4 {
    public static void main(String[] args) {
        // 抽象类不能实例化 ，但能new（匿名内部类）
        // Shape shape = new Shape(); // 错误的
        // 多态
        Shape shape = new Circle(2);
        System.out.println("圆的面积为："+shape.getArea());
    }
}
